#include "TcpConnect.h"
#include "Socket.h"


int TcpConnect::read(void *buf, int len, int timeout){
	return Socket::tcpRead(_socketFd, buf, len, timeout);
}

int TcpConnect::write(void *buf, int len, int timeout){
	return Socket::Write(_socketFd, buf, len, timeout);
}

int TcpConnect::close(){
	return Socket::tcpClose(_socketFd);
}

bool TcpConnect::alive(){
	if(_socketFd < 0)
		return false;
	if(_status == NOTUSE || _status == DEAD)
		return false;
	return true;
}

